Optimal. Leaf size=17 \[ a x-\frac {b \tanh ^{-1}(\sin (c+d x))}{d} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.03, antiderivative size = 17, normalized size of antiderivative = 1.00, number of steps
used = 3, number of rules used = 2, integrand size = 30, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.067, Rules used = {4127, 3855}
\begin {gather*} a x-\frac {b \tanh ^{-1}(\sin (c+d x))}{d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 3855
Rule 4127
Rubi steps
\begin {align*} \int \frac {a^2-b^2 \sec ^2(c+d x)}{a+b \sec (c+d x)} \, dx &=-\int (-a+b \sec (c+d x)) \, dx\\ &=a x-b \int \sec (c+d x) \, dx\\ &=a x-\frac {b \tanh ^{-1}(\sin (c+d x))}{d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.01, size = 17, normalized size = 1.00 \begin {gather*} a x-\frac {b \tanh ^{-1}(\sin (c+d x))}{d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.06, size = 30, normalized size = 1.76
method | result | size |
derivativedivides | \(\frac {a \left (d x +c \right )-b \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{d}\) | \(30\) |
default | \(\frac {a \left (d x +c \right )-b \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{d}\) | \(30\) |
risch | \(a x +\frac {b \ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right )}{d}-\frac {b \ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right )}{d}\) | \(42\) |
norman | \(\frac {a x \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-a x}{\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )-1}+\frac {b \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}{d}-\frac {b \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}{d}\) | \(72\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: ValueError} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 36 vs.
\(2 (17) = 34\).
time = 1.73, size = 36, normalized size = 2.12 \begin {gather*} \frac {2 \, a d x - b \log \left (\sin \left (d x + c\right ) + 1\right ) + b \log \left (-\sin \left (d x + c\right ) + 1\right )}{2 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A]
time = 1.57, size = 41, normalized size = 2.41 \begin {gather*} a x - b \left (\begin {cases} \frac {x \left (\tan {\left (c \right )} \sec {\left (c \right )} + \sec ^{2}{\left (c \right )}\right )}{\tan {\left (c \right )} + \sec {\left (c \right )}} & \text {for}\: d = 0 \\\frac {\log {\left (\tan {\left (c + d x \right )} + \sec {\left (c + d x \right )} \right )}}{d} & \text {otherwise} \end {cases}\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 43 vs.
\(2 (17) = 34\).
time = 0.47, size = 43, normalized size = 2.53 \begin {gather*} \frac {{\left (d x + c\right )} a - b \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 1 \right |}\right ) + b \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 1 \right |}\right )}{d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 3.69, size = 57, normalized size = 3.35 \begin {gather*} \frac {2\,a\,\mathrm {atan}\left (\frac {\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}\right )}{d}-\frac {2\,b\,\mathrm {atanh}\left (\frac {\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}\right )}{d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________